package com.gexiaobao.pigeon.app.model.bean

import android.os.Parcelable
import com.gexiaobao.pigeon.app.util.Util
import kotlinx.android.parcel.Parcelize

/**
 * @Author      : hxw
 * @Date        : 2023/3/3 14:45
 * @Describe    :
 */
@Parcelize
class QueryBankListResponse(

    var total: Int = 0,
    var list: ArrayList<ListBean> = ArrayList()

) : Parcelable {

    /**
     * 数据是否为空
     */
    fun isEmpty() = list == null || (list as List<*>).isEmpty()

    @Parcelize
    class ListBean(
        var bankCardNo: String = "",//
        var bankName: String = "",//
        var bindTime: String = "",//
        var cardType: Int = 0,//卡类型 1借记卡，2信用卡
        var bindState: Int = 0,//绑定状态 1已绑定，2已解除

    ) : Parcelable {
        override fun toString(): String {
            var type = "储蓄卡"
            if (cardType == 2) type = "信用卡"
            return "$bankName $type ${Util.checkCardNoWeiHao(bankCardNo)}"
        }
    }
}